
package com.jf.cloud.multishop.service.impl;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.util.PageUtil;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.multishop.dto.AuditingInfoDTO;
import com.jf.cloud.multishop.mapper.ShopAuditingMapper;
import com.jf.cloud.multishop.model.ShopAuditing;
import com.jf.cloud.multishop.service.ShopAuditingService;
import com.jf.cloud.multishop.vo.ShopAuditingInfoVO;
import com.jf.cloud.multishop.vo.ShopAuditingVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 商家审核信息
 *
 * @author zz
 * @date 2021-02-01 17:10:35
 */
@Service
public class ShopAuditingServiceImpl implements ShopAuditingService {

    @Autowired
    private ShopAuditingMapper shopAuditingMapper;



    @Override
    public PageVO<ShopAuditingVO> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO, () -> shopAuditingMapper.list());
    }

    @Override
    public ShopAuditingVO getByShopAuditingId(Long shopAuditingId) {
        return shopAuditingMapper.getByShopAuditingId(shopAuditingId);
    }

    @Override
    public void save(ShopAuditing shopAuditing) {
        shopAuditingMapper.save(shopAuditing);
    }

    @Override
    public void update(ShopAuditing shopAuditing) {
        shopAuditingMapper.update(shopAuditing);
    }

    @Override
    public void deleteById(Long shopAuditingId) {
        shopAuditingMapper.deleteById(shopAuditingId);
    }

    @Override
    public ShopAuditingVO getByshopId(Long shopId) {
        return shopAuditingMapper.getByshopId(shopId);
    }

    @Override
    public PageVO<ShopAuditingInfoVO> auditingInfoPage(PageDTO pageDTO, AuditingInfoDTO auditingInfoDTO) {
        return PageUtil.doPage(pageDTO, () -> shopAuditingMapper.auditingInfoList(auditingInfoDTO));
    }

}
